package cn.cj.erp.serviceimpl.system;

import cn.cj.erp.common.utils.Convert;
import cn.cj.erp.bo.system.SysLogBo;
import cn.cj.erp.service.system.SysLogService;
import cn.cj.erp.entity.system.SysLog;
import cn.cj.erp.dao.system.SysLogDao;
import cn.cj.erp.serviceimpl.base.ServiceImpl;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;

/**
 * 系统操作日志
 *
 * @author chenjian
 */
@Service
public class SysLogServiceImpl extends ServiceImpl<SysLog, SysLogBo> implements SysLogService {
    @Resource
    private SysLogDao sysLogDao;

    @Override
    public SysLogDao getBaseMapper() {
        return sysLogDao;
    }

    @Override
    public SysLog convert2Entity(SysLogBo sysLogBo) {
        return Convert.convert(sysLogBo, SysLog.class);
    }

    @Override
    public SysLogBo convert2Bo(SysLog sysLog) {
        return Convert.convert(sysLog, SysLogBo.class);
    }

    @Override
    public Boolean clean() {
        sysLogDao.clean();
        return true;
    }
}
